<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class WheatPrice extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'wheat_price';
    public $timestamps = false;
    public function scopeSearch($query, $params)
    {

        if(!empty($params['now_date'])){
            if($params['now_date'] != '全部日期'){
                $query->where('now_date',$params['now_date']);
            }
        }
        return $query;
    }
}
